﻿@model Apps.Models.PUB.PUB_CY_PARTITIONModel
@using Apps.Web.Core;
@using Apps.Common;
@using Apps.Models.PUB;
@using Apps.Web;
@using Apps.Locale;
@using Apps.Models.Sys;
@{
    ViewBag.Title = "修改";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = null;
}

<script type="text/javascript">
$(function () {
    $("#btnSave").click(function () {
        if ($("form").valid()) {
            $.ajax({
                url: "@Url.Action("Edit")",
                type: "Post",
                data: $("form").serialize(),
                dataType: "json",
                success: function (data) {
                    if (data.type == 1) {
                        window.parent.frameReturnByMes(data.message);
                        window.parent.frameReturnByReload(false);
                        window.parent.frameReturnByClose()
                    }
                    else {
                        window.parent.frameReturnByMes(data.message);
                    }
                }
            });
        }
        return false;
    });
    $("#btnReturn").click(function () {
         window.parent.frameReturnByClose();
    });
});
</script>
<div class="mvctool bgb">
@Html.ToolButton("btnSave", "fa fa-save", Resource.Save,ref perm, "Save", true)
@Html.ToolButton("btnReturn", "fa fa-reply", Resource.Reply,false)
</div>
@using (Html.BeginForm())
{
    @Html.HiddenFor(model => model.PARTITION_ID)
    <table class="formtable">
        <tbody>
            <tr>
                <th>
                    @Html.LabelFor(model => model.PARTITION_NAME,0)：
                </th>
                <td>
                    @Html.EditorFor(model => model.PARTITION_NAME)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.COALYARD_ID,0)：
                </th>
                <td>
                    @Html.DropDownListFor(model => model.COALYARD_ID, ViewBag.CYCOALYARD as SelectList)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.ENABLED,0)：
                </th>
                <td>
                    @Html.SwitchDropdown("ENABLED", Model.ENABLED, "可用", "不可用")
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.ORDERS,0)：
                </th>
                <td>
                    @Html.EditorFor(model => model.ORDERS)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.MAX_INVENTORY,0)：
                </th>
                <td>
                    @Html.EditorFor(model => model.MAX_INVENTORY)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.MAX_HEIGHT,0)：
                </th>
                <td>
                    @Html.EditorFor(model => model.MAX_HEIGHT)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.BEGIN_WIDTH,0)：
                </th>
                <td>
                    @Html.EditorFor(model => model.BEGIN_WIDTH)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.END_WIDTH,0)：
                </th>
                <td>
                    @Html.EditorFor(model => model.END_WIDTH)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.BEGIN_LENGTH,0)：
                </th>
                <td>
                    @Html.EditorFor(model => model.BEGIN_LENGTH)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.END_LENGTH,0)：
                </th>
                <td>
                    @Html.EditorFor(model => model.END_LENGTH)
                </td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.REMARKS,0)：
                </th>
                <td style="height:80px;">
                    @Html.TextAreaFor(model => model.REMARKS, new { @style = "height:50px;" })
                </td>
            </tr>
        </tbody>
    </table>
@Html.ValidationSummary()
}

